/*
 * tnumber.h
 *
 *  Created on: Jan 24, 2016
 *      Author: root
 */

#ifndef TNUMBER_H_
#define TNUMBER_H_

#include "../basic/ds.h"

Cell* n_zero;
Cell* n_one;

char* number_to_string(Scheme *sc, Cell* num);

DEFINE_OPERATOR( add              );
DEFINE_OPERATOR( mul              );
DEFINE_OPERATOR( sub              );
DEFINE_OPERATOR( div              );
DEFINE_OPERATOR( numeq            );
DEFINE_OPERATOR( number_to_string );
INIT_OPERATORS( number );

int type_priority(char *type);
Cell* combine_convert(Scheme *sc, Cell *x, Cell *y);

int is_zero_number(Cell* x);
int eqn(Cell *a, Cell *b);
Cell* real_to_complex(Scheme *sc, Cell* x);
Cell* number_add(Scheme *sc, Cell* x, Cell* y);
Cell* number_mul(Scheme *sc, Cell* x, Cell* y);
Cell* number_sub(Scheme *sc, Cell* x, Cell* y);
Cell* number_div(Scheme *sc, Cell* x, Cell* y);

#endif /* TNUMBER_H_ */
